//
//  ContributeViewController.m
//  CWRD
//
//  Created by lanou on 15/9/17.
//  Copyright (c) 2015年 lanou. All rights reserved.
//

#import "ContributeViewController.h"

@interface ContributeViewController ()

@end

@implementation ContributeViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    self.view.backgroundColor = [UIColor whiteColor];
    self.navigationItem.title = @"我要投稿";
    [self.navigationController.navigationBar setTitleTextAttributes:[NSDictionary dictionaryWithObjectsAndKeys:[UIColor cyanColor],NSForegroundColorAttributeName, nil]];
    [self addView];
    
    UIBarButtonItem *contribute = [[UIBarButtonItem alloc] initWithTitle:@"投稿" style:UIBarButtonItemStylePlain target:self action:@selector(contribute)];
    self.navigationItem.rightBarButtonItem = contribute;
}

- (void)addView{
    UITextField *nameTextField = [[UITextField alloc] initWithFrame:CGRectMake(20, 20, kWidth - 40, 40)];
    nameTextField.placeholder = @"昵称";
    nameTextField.textAlignment = NSTextAlignmentCenter;
    nameTextField.borderStyle = UITextBorderStyleRoundedRect;
    [self.view addSubview:nameTextField];
    
    UITextField *mail = [[UITextField alloc] initWithFrame:CGRectMake(20, 80, kWidth - 40, 40)];
    mail.placeholder = @"邮箱(必填)";
    mail.textAlignment = NSTextAlignmentCenter;
    mail.borderStyle = UITextBorderStyleRoundedRect;
    [self.view addSubview:mail];
    
    UITextField *link = [[UITextField alloc] initWithFrame:CGRectMake(20, 140, kWidth - 40, 100)];
    link.placeholder = @"视频名称&视频播放链接(必填)";
    link.textAlignment = NSTextAlignmentCenter;
    link.borderStyle = UITextBorderStyleRoundedRect;
    [self.view addSubview:link];
    
}

- (void)contribute{
    
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
